const path = require("path");
module.exports = {
  webpack: {
    configure: (webpackConfig) => {
      webpackConfig.output.library = `react18`;
      webpackConfig.output.libraryTarget = "umd";
      webpackConfig.output.umdNamedDefine = true;
      webpackConfig.output.publicPath = "http://localhost:9002/"; 
      return webpackConfig;
    },
  },
  alias:{
    "@": path.resolve(__dirname, "src"),
  },
  devServer:{
    port:9002,
    open: true,
    hot: true,
    headers: {
      "Access-Control-Allow-Origin": "*",
    },
    historyApiFallback: true,
    allowedHosts: 'all',
  }
};
